#ifndef SIX_STEP_H
#define SIX_STEP_H

#include "six_step_interface.h"
#include "motor.h"
#include "bemf.h"

// 换相顺序
typedef enum
{
    step_1 = 0,
    step_2,
    step_3,
    step_4,
    step_5,
    step_6
} reversal_order_t;

typedef enum
{
    clock_wise = 0,
    counter_clock_wise
}rotation_direction_t;

typedef struct six_step
{
    unsigned int target_speed;
    mos_ctrl_mode_t mode;
    rotation_direction_t direction;
    motor_t motor;
    sector_t sector;
}six_step_t;

// 对外接口
extern void change_step(const six_step_t *sector);

#endif
